.class public Lcom/waiqin365/h5/io/WqDownloadFile;
.super Lorg/apache/cordova/CordovaPlugin;


# instance fields
.field private a:Lorg/apache/cordova/WqCordovaActivity;

.field private b:Lorg/apache/cordova/CordovaArgs;

.field private c:Ljava/lang/String;

.field private d:Z

.field private e:Lorg/apache/cordova/CallbackContext;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lorg/apache/cordova/CordovaPlugin;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->d:Z

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/h5/io/WqDownloadFile;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->c:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic a(Lcom/waiqin365/h5/io/WqDownloadFile;Z)Z
    .locals 0

    iput-boolean p1, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->d:Z

    return p1
.end method

.method static synthetic b(Lcom/waiqin365/h5/io/WqDownloadFile;)Lorg/apache/cordova/WqCordovaActivity;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->a:Lorg/apache/cordova/WqCordovaActivity;

    return-object v0
.end method


# virtual methods
.method public execute(Ljava/lang/String;Lorg/apache/cordova/CordovaArgs;Lorg/apache/cordova/CallbackContext;)Z
    .locals 4

    const/4 v1, 0x1

    const/4 v2, 0x0

    iget-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->cordova:Lorg/apache/cordova/CordovaInterface;

    invoke-interface {v0}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

    move-result-object v0

    check-cast v0, Lorg/apache/cordova/WqCordovaActivity;

    iput-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->a:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->a:Lorg/apache/cordova/WqCordovaActivity;

    iput-object p3, v0, Lorg/apache/cordova/WqCordovaActivity;->callbackContextDownloadFile:Lorg/apache/cordova/CallbackContext;

    iput-object p3, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->e:Lorg/apache/cordova/CallbackContext;

    iput-boolean v2, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->d:Z

    iput-object p2, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->b:Lorg/apache/cordova/CordovaArgs;

    if-eqz p2, :cond_1

    invoke-virtual {p2, v2}, Lorg/apache/cordova/CordovaArgs;->isNull(I)Z

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {p2, v2}, Lorg/apache/cordova/CordovaArgs;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->c:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->a:Lorg/apache/cordova/WqCordovaActivity;

    invoke-virtual {v0}, Lorg/apache/cordova/WqCordovaActivity;->getThreadPool()Ljava/util/concurrent/ExecutorService;

    move-result-object v0

    new-instance v2, Lcom/waiqin365/h5/io/a;

    invoke-direct {v2, p0}, Lcom/waiqin365/h5/io/a;-><init>(Lcom/waiqin365/h5/io/WqDownloadFile;)V

    invoke-interface {v0, v2}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    iget-boolean v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->d:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->a:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    :cond_0
    move v0, v1

    :goto_0
    return v0

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->a:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v1, p0, Lcom/waiqin365/h5/io/WqDownloadFile;->a:Lorg/apache/cordova/WqCordovaActivity;

    const v3, 0x7f080615

    invoke-virtual {v1, v3}, Lorg/apache/cordova/WqCordovaActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;)V

    move v0, v2

    goto :goto_0
.end method
